<?php
	$clinicNo = $_POST["clinicNo"];
	$content = "";
	include_once 'json_function.php';
	
	if( $clinicNo == 0 || !file_exists("./config/clinic_content/".$clinicNo.".txt") || filesize("./config/clinic_content/".$clinicNo.".txt") == 0 ){
		$fp = fopen("./config/clinic_content/default.txt", "r");
		$content = fread($fp, filesize("./config/clinic_content/default.txt"));
		fclose($fp);
	}else{
		$fp = fopen("./config/clinic_content/".$clinicNo.".txt", "r");
		$content = fread($fp, filesize("./config/clinic_content/".$clinicNo.".txt"));
		fclose($fp);
	}
	
	$content = replaceQuoteAndSlash($content);
	echo JsonCharFilter($content);
?>